package com.example.miuicolorpick

import android.graphics.Rect

object ViewUtil {

     fun isInViewArea(r: Rect?, x:Float,  y: Float) :Boolean{
         if (r != null) {
             if (x > r.left && x < r.right && y > r.top && y < r.bottom) {
                 return true;
             }
         }
        return false;
    }


}